\(\int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{9/2} \, dx\) [816]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-1)]
   Maxima [B] (verification not implemented)
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 45, antiderivative size = 350 \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{9/2} \, dx=-\frac {5 a^{7/2} (8 i A-B) c^{9/2} \arctan \left (\frac {\sqrt {c} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c-i c \tan (e+f x)}}\right )}{64 f}+\frac {5 a^3 (8 A+i B) c^4 \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{128 f}+\frac {5 a^2 (8 A+i B) c^3 \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}}{192 f}+\frac {a (8 A+i B) c^2 \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{48 f}-\frac {(8 i A-B) c (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{56 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{9/2}}{8 f} \]

[Out]

-5/64*a^(7/2)*(8*I*A-B)*c^(9/2)*arctan(c^(1/2)*(a+I*a*tan(f*x+e))^(1/2)/a^(1/2)/(c-I*c*tan(f*x+e))^(1/2))/f+5/
128*a^3*(8*A+I*B)*c^4*(a+I*a*tan(f*x+e))^(1/2)*(c-I*c*tan(f*x+e))^(1/2)*tan(f*x+e)/f+5/192*a^2*(8*A+I*B)*c^3*t
an(f*x+e)*(a+I*a*tan(f*x+e))^(3/2)*(c-I*c*tan(f*x+e))^(3/2)/f+1/48*a*(8*A+I*B)*c^2*tan(f*x+e)*(a+I*a*tan(f*x+e
))^(5/2)*(c-I*c*tan(f*x+e))^(5/2)/f-1/56*(8*I*A-B)*c*(a+I*a*tan(f*x+e))^(7/2)*(c-I*c*tan(f*x+e))^(7/2)/f+1/8*B
*(a+I*a*tan(f*x+e))^(7/2)*(c-I*c*tan(f*x+e))^(9/2)/f

Rubi [A] (verified)

Time = 0.44 (sec) , antiderivative size = 350, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {3669, 81, 51, 38, 65, 223, 209} \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{9/2} \, dx=-\frac {5 a^{7/2} c^{9/2} (-B+8 i A) \arctan \left (\frac {\sqrt {c} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c-i c \tan (e+f x)}}\right )}{64 f}+\frac {5 a^3 c^4 (8 A+i B) \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{128 f}+\frac {5 a^2 c^3 (8 A+i B) \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}}{192 f}+\frac {a c^2 (8 A+i B) \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{48 f}-\frac {c (-B+8 i A) (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{56 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{9/2}}{8 f} \]

[In]

Int[(a + I*a*Tan[e + f*x])^(7/2)*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^(9/2),x]

[Out]

(-5*a^(7/2)*((8*I)*A - B)*c^(9/2)*ArcTan[(Sqrt[c]*Sqrt[a + I*a*Tan[e + f*x]])/(Sqrt[a]*Sqrt[c - I*c*Tan[e + f*
x]])])/(64*f) + (5*a^3*(8*A + I*B)*c^4*Tan[e + f*x]*Sqrt[a + I*a*Tan[e + f*x]]*Sqrt[c - I*c*Tan[e + f*x]])/(12
8*f) + (5*a^2*(8*A + I*B)*c^3*Tan[e + f*x]*(a + I*a*Tan[e + f*x])^(3/2)*(c - I*c*Tan[e + f*x])^(3/2))/(192*f)
+ (a*(8*A + I*B)*c^2*Tan[e + f*x]*(a + I*a*Tan[e + f*x])^(5/2)*(c - I*c*Tan[e + f*x])^(5/2))/(48*f) - (((8*I)*
A - B)*c*(a + I*a*Tan[e + f*x])^(7/2)*(c - I*c*Tan[e + f*x])^(7/2))/(56*f) + (B*(a + I*a*Tan[e + f*x])^(7/2)*(
c - I*c*Tan[e + f*x])^(9/2))/(8*f)

Rule 38

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[x*(a + b*x)^m*((c + d*x)^m/(2*m + 1))
, x] + Dist[2*a*c*(m/(2*m + 1)), Int[(a + b*x)^(m - 1)*(c + d*x)^(m - 1), x], x] /; FreeQ[{a, b, c, d}, x] &&
EqQ[b*c + a*d, 0] && IGtQ[m + 1/2, 0]

Rule 51

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^n/(b*(m
+ n + 1))), x] + Dist[2*c*(n/(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, c, d}, x]
 && EqQ[b*c + a*d, 0] && IGtQ[m + 1/2, 0] && IGtQ[n + 1/2, 0] && LtQ[m, n]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 81

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[b*(c + d*x)^
(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), x] + Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(
d*f*(n + p + 2)), Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2,
0]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 3669

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a*(c/f), Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x
], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {(a c) \text {Subst}\left (\int (a+i a x)^{5/2} (A+B x) (c-i c x)^{7/2} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{9/2}}{8 f}+\frac {(a (8 A+i B) c) \text {Subst}\left (\int (a+i a x)^{5/2} (c-i c x)^{7/2} \, dx,x,\tan (e+f x)\right )}{8 f} \\ & = -\frac {(8 i A-B) c (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{56 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{9/2}}{8 f}+\frac {\left (a (8 A+i B) c^2\right ) \text {Subst}\left (\int (a+i a x)^{5/2} (c-i c x)^{5/2} \, dx,x,\tan (e+f x)\right )}{8 f} \\ & = \frac {a (8 A+i B) c^2 \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{48 f}-\frac {(8 i A-B) c (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{56 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{9/2}}{8 f}+\frac {\left (5 a^2 (8 A+i B) c^3\right ) \text {Subst}\left (\int (a+i a x)^{3/2} (c-i c x)^{3/2} \, dx,x,\tan (e+f x)\right )}{48 f} \\ & = \frac {5 a^2 (8 A+i B) c^3 \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}}{192 f}+\frac {a (8 A+i B) c^2 \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{48 f}-\frac {(8 i A-B) c (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{56 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{9/2}}{8 f}+\frac {\left (5 a^3 (8 A+i B) c^4\right ) \text {Subst}\left (\int \sqrt {a+i a x} \sqrt {c-i c x} \, dx,x,\tan (e+f x)\right )}{64 f} \\ & = \frac {5 a^3 (8 A+i B) c^4 \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{128 f}+\frac {5 a^2 (8 A+i B) c^3 \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}}{192 f}+\frac {a (8 A+i B) c^2 \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{48 f}-\frac {(8 i A-B) c (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{56 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{9/2}}{8 f}+\frac {\left (5 a^4 (8 A+i B) c^5\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+i a x} \sqrt {c-i c x}} \, dx,x,\tan (e+f x)\right )}{128 f} \\ & = \frac {5 a^3 (8 A+i B) c^4 \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{128 f}+\frac {5 a^2 (8 A+i B) c^3 \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}}{192 f}+\frac {a (8 A+i B) c^2 \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{48 f}-\frac {(8 i A-B) c (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{56 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{9/2}}{8 f}-\frac {\left (5 a^3 (8 i A-B) c^5\right ) \text {Subst}\left (\int \frac {1}{\sqrt {2 c-\frac {c x^2}{a}}} \, dx,x,\sqrt {a+i a \tan (e+f x)}\right )}{64 f} \\ & = \frac {5 a^3 (8 A+i B) c^4 \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{128 f}+\frac {5 a^2 (8 A+i B) c^3 \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}}{192 f}+\frac {a (8 A+i B) c^2 \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{48 f}-\frac {(8 i A-B) c (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{56 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{9/2}}{8 f}-\frac {\left (5 a^3 (8 i A-B) c^5\right ) \text {Subst}\left (\int \frac {1}{1+\frac {c x^2}{a}} \, dx,x,\frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {c-i c \tan (e+f x)}}\right )}{64 f} \\ & = -\frac {5 a^{7/2} (8 i A-B) c^{9/2} \arctan \left (\frac {\sqrt {c} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c-i c \tan (e+f x)}}\right )}{64 f}+\frac {5 a^3 (8 A+i B) c^4 \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{128 f}+\frac {5 a^2 (8 A+i B) c^3 \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}}{192 f}+\frac {a (8 A+i B) c^2 \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{48 f}-\frac {(8 i A-B) c (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{56 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{9/2}}{8 f} \\ \end{align*}

Mathematica [A] (verified)

Time = 9.43 (sec) , antiderivative size = 241, normalized size of antiderivative = 0.69 \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{9/2} \, dx=\frac {a^{7/2} c^5 \sqrt {1-i \tan (e+f x)} \left (210 (-8 i A+B) \arcsin \left (\frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {2} \sqrt {a}}\right ) \sqrt {a+i a \tan (e+f x)}+\frac {1}{64} \sqrt {a} \sec ^6(e+f x) \sqrt {1-i \tan (e+f x)} (1+i \tan (e+f x)) (24576 (-i A+B)+7 (8 A+i B) \sec (e+f x) (383 \sin (3 (e+f x))+115 \sin (5 (e+f x))+15 \sin (7 (e+f x)))+7 (2264 A-2789 i B) \tan (e+f x))\right )}{2688 f \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}} \]

[In]

Integrate[(a + I*a*Tan[e + f*x])^(7/2)*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^(9/2),x]

[Out]

(a^(7/2)*c^5*Sqrt[1 - I*Tan[e + f*x]]*(210*((-8*I)*A + B)*ArcSin[Sqrt[a + I*a*Tan[e + f*x]]/(Sqrt[2]*Sqrt[a])]
*Sqrt[a + I*a*Tan[e + f*x]] + (Sqrt[a]*Sec[e + f*x]^6*Sqrt[1 - I*Tan[e + f*x]]*(1 + I*Tan[e + f*x])*(24576*((-
I)*A + B) + 7*(8*A + I*B)*Sec[e + f*x]*(383*Sin[3*(e + f*x)] + 115*Sin[5*(e + f*x)] + 15*Sin[7*(e + f*x)]) + 7
*(2264*A - (2789*I)*B)*Tan[e + f*x]))/64))/(2688*f*Sqrt[a + I*a*Tan[e + f*x]]*Sqrt[c - I*c*Tan[e + f*x]])

Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 603 vs. \(2 (289 ) = 578\).

Time = 0.50 (sec) , antiderivative size = 604, normalized size of antiderivative = 1.73

method result size
derivativedivides \(-\frac {\sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{3} c^{4} \left (826 i B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{3}+105 i B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )+1152 i A \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )^{4}-384 B \tan \left (f x +e \right )^{6} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+1152 i A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{2}-448 A \tan \left (f x +e \right )^{5} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+384 i A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{6}-1152 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{4}+336 i B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{7}-1456 A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{3}+384 i A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}-105 i B \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right ) a c -1152 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{2}+952 i B \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )^{5}-840 A \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right ) a c -1848 A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )-384 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\right )}{2688 f \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}\) \(604\)
default \(-\frac {\sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{3} c^{4} \left (826 i B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{3}+105 i B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )+1152 i A \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )^{4}-384 B \tan \left (f x +e \right )^{6} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+1152 i A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{2}-448 A \tan \left (f x +e \right )^{5} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+384 i A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{6}-1152 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{4}+336 i B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{7}-1456 A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{3}+384 i A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}-105 i B \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right ) a c -1152 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{2}+952 i B \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )^{5}-840 A \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right ) a c -1848 A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )-384 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\right )}{2688 f \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}\) \(604\)
parts \(-\frac {A \sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{3} c^{4} \left (48 i \tan \left (f x +e \right )^{6} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+144 i \tan \left (f x +e \right )^{4} \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}-56 \tan \left (f x +e \right )^{5} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+144 i \tan \left (f x +e \right )^{2} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}-182 \tan \left (f x +e \right )^{3} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+48 i \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}-105 a c \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right )-231 \tan \left (f x +e \right ) \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}\right )}{336 f \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}}+\frac {B \sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{3} c^{4} \left (-336 i \tan \left (f x +e \right )^{7} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}-952 i \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{5}+384 \tan \left (f x +e \right )^{6} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}-826 i \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{3}+1152 \tan \left (f x +e \right )^{4} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+105 i \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right ) a c -105 i \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )+1152 \tan \left (f x +e \right )^{2} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+384 \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\right )}{2688 f \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}}\) \(653\)

[In]

int((a+I*a*tan(f*x+e))^(7/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^(9/2),x,method=_RETURNVERBOSE)

[Out]

-1/2688/f*(a*(1+I*tan(f*x+e)))^(1/2)*(-c*(I*tan(f*x+e)-1))^(1/2)*a^3*c^4*(826*I*B*(a*c)^(1/2)*(a*c*(1+tan(f*x+
e)^2))^(1/2)*tan(f*x+e)^3+105*I*B*(a*c)^(1/2)*(a*c*(1+tan(f*x+e)^2))^(1/2)*tan(f*x+e)+1152*I*A*(a*c)^(1/2)*(a*
c*(1+tan(f*x+e)^2))^(1/2)*tan(f*x+e)^4-384*B*tan(f*x+e)^6*(a*c*(1+tan(f*x+e)^2))^(1/2)*(a*c)^(1/2)+1152*I*A*(a
*c)^(1/2)*(a*c*(1+tan(f*x+e)^2))^(1/2)*tan(f*x+e)^2-448*A*tan(f*x+e)^5*(a*c*(1+tan(f*x+e)^2))^(1/2)*(a*c)^(1/2
)+384*I*A*(a*c)^(1/2)*(a*c*(1+tan(f*x+e)^2))^(1/2)*tan(f*x+e)^6-1152*B*(a*c)^(1/2)*(a*c*(1+tan(f*x+e)^2))^(1/2
)*tan(f*x+e)^4+336*I*B*(a*c)^(1/2)*(a*c*(1+tan(f*x+e)^2))^(1/2)*tan(f*x+e)^7-1456*A*(a*c)^(1/2)*(a*c*(1+tan(f*
x+e)^2))^(1/2)*tan(f*x+e)^3+384*I*A*(a*c)^(1/2)*(a*c*(1+tan(f*x+e)^2))^(1/2)-105*I*B*ln((a*c*tan(f*x+e)+(a*c)^
(1/2)*(a*c*(1+tan(f*x+e)^2))^(1/2))/(a*c)^(1/2))*a*c-1152*B*(a*c)^(1/2)*(a*c*(1+tan(f*x+e)^2))^(1/2)*tan(f*x+e
)^2+952*I*B*(a*c)^(1/2)*(a*c*(1+tan(f*x+e)^2))^(1/2)*tan(f*x+e)^5-840*A*ln((a*c*tan(f*x+e)+(a*c)^(1/2)*(a*c*(1
+tan(f*x+e)^2))^(1/2))/(a*c)^(1/2))*a*c-1848*A*(a*c)^(1/2)*(a*c*(1+tan(f*x+e)^2))^(1/2)*tan(f*x+e)-384*B*(a*c)
^(1/2)*(a*c*(1+tan(f*x+e)^2))^(1/2))/(a*c)^(1/2)/(a*c*(1+tan(f*x+e)^2))^(1/2)

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 882 vs. \(2 (270) = 540\).

Time = 0.29 (sec) , antiderivative size = 882, normalized size of antiderivative = 2.52 \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{9/2} \, dx=\text {Too large to display} \]

[In]

integrate((a+I*a*tan(f*x+e))^(7/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^(9/2),x, algorithm="fricas")

[Out]

1/5376*(105*sqrt((64*A^2 + 16*I*A*B - B^2)*a^7*c^9/f^2)*(f*e^(14*I*f*x + 14*I*e) + 7*f*e^(12*I*f*x + 12*I*e) +
 21*f*e^(10*I*f*x + 10*I*e) + 35*f*e^(8*I*f*x + 8*I*e) + 35*f*e^(6*I*f*x + 6*I*e) + 21*f*e^(4*I*f*x + 4*I*e) +
 7*f*e^(2*I*f*x + 2*I*e) + f)*log(4*(2*((8*I*A - B)*a^3*c^4*e^(3*I*f*x + 3*I*e) + (8*I*A - B)*a^3*c^4*e^(I*f*x
 + I*e))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(c/(e^(2*I*f*x + 2*I*e) + 1)) + sqrt((64*A^2 + 16*I*A*B - B^2)*
a^7*c^9/f^2)*(f*e^(2*I*f*x + 2*I*e) - f))/((8*I*A - B)*a^3*c^4*e^(2*I*f*x + 2*I*e) + (8*I*A - B)*a^3*c^4)) - 1
05*sqrt((64*A^2 + 16*I*A*B - B^2)*a^7*c^9/f^2)*(f*e^(14*I*f*x + 14*I*e) + 7*f*e^(12*I*f*x + 12*I*e) + 21*f*e^(
10*I*f*x + 10*I*e) + 35*f*e^(8*I*f*x + 8*I*e) + 35*f*e^(6*I*f*x + 6*I*e) + 21*f*e^(4*I*f*x + 4*I*e) + 7*f*e^(2
*I*f*x + 2*I*e) + f)*log(4*(2*((8*I*A - B)*a^3*c^4*e^(3*I*f*x + 3*I*e) + (8*I*A - B)*a^3*c^4*e^(I*f*x + I*e))*
sqrt(a/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(c/(e^(2*I*f*x + 2*I*e) + 1)) - sqrt((64*A^2 + 16*I*A*B - B^2)*a^7*c^9/f
^2)*(f*e^(2*I*f*x + 2*I*e) - f))/((8*I*A - B)*a^3*c^4*e^(2*I*f*x + 2*I*e) + (8*I*A - B)*a^3*c^4)) - 4*(105*(8*
I*A - B)*a^3*c^4*e^(15*I*f*x + 15*I*e) + 805*(8*I*A - B)*a^3*c^4*e^(13*I*f*x + 13*I*e) + 2681*(8*I*A - B)*a^3*
c^4*e^(11*I*f*x + 11*I*e) + 5053*(8*I*A - B)*a^3*c^4*e^(9*I*f*x + 9*I*e) - (-8728*I*A + 44099*B)*a^3*c^4*e^(7*
I*f*x + 7*I*e) + 2681*(-8*I*A + B)*a^3*c^4*e^(5*I*f*x + 5*I*e) + 805*(-8*I*A + B)*a^3*c^4*e^(3*I*f*x + 3*I*e)
+ 105*(-8*I*A + B)*a^3*c^4*e^(I*f*x + I*e))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(c/(e^(2*I*f*x + 2*I*e) + 1)
))/(f*e^(14*I*f*x + 14*I*e) + 7*f*e^(12*I*f*x + 12*I*e) + 21*f*e^(10*I*f*x + 10*I*e) + 35*f*e^(8*I*f*x + 8*I*e
) + 35*f*e^(6*I*f*x + 6*I*e) + 21*f*e^(4*I*f*x + 4*I*e) + 7*f*e^(2*I*f*x + 2*I*e) + f)

Sympy [F(-1)]

Timed out. \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{9/2} \, dx=\text {Timed out} \]

[In]

integrate((a+I*a*tan(f*x+e))**(7/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))**(9/2),x)

[Out]

Timed out

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 2603 vs. \(2 (270) = 540\).

Time = 19.78 (sec) , antiderivative size = 2603, normalized size of antiderivative = 7.44 \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{9/2} \, dx=\text {Too large to display} \]

[In]

integrate((a+I*a*tan(f*x+e))^(7/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^(9/2),x, algorithm="maxima")

[Out]

-86016*(420*(8*A + I*B)*a^3*c^4*cos(15/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 3220*(8*A + I*B)*a^3*c
^4*cos(13/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 10724*(8*A + I*B)*a^3*c^4*cos(11/2*arctan2(sin(2*f*
x + 2*e), cos(2*f*x + 2*e))) + 20212*(8*A + I*B)*a^3*c^4*cos(9/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))
+ 4*(8728*A + 44099*I*B)*a^3*c^4*cos(7/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) - 10724*(8*A + I*B)*a^3*
c^4*cos(5/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) - 3220*(8*A + I*B)*a^3*c^4*cos(3/2*arctan2(sin(2*f*x
+ 2*e), cos(2*f*x + 2*e))) - 420*(8*A + I*B)*a^3*c^4*cos(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 42
0*(8*I*A - B)*a^3*c^4*sin(15/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 3220*(8*I*A - B)*a^3*c^4*sin(13/
2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 10724*(8*I*A - B)*a^3*c^4*sin(11/2*arctan2(sin(2*f*x + 2*e),
cos(2*f*x + 2*e))) + 20212*(8*I*A - B)*a^3*c^4*sin(9/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 4*(8728*
I*A - 44099*B)*a^3*c^4*sin(7/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 10724*(-8*I*A + B)*a^3*c^4*sin(5
/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 3220*(-8*I*A + B)*a^3*c^4*sin(3/2*arctan2(sin(2*f*x + 2*e),
cos(2*f*x + 2*e))) + 420*(-8*I*A + B)*a^3*c^4*sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 210*((8*A
 + I*B)*a^3*c^4*cos(16*f*x + 16*e) + 8*(8*A + I*B)*a^3*c^4*cos(14*f*x + 14*e) + 28*(8*A + I*B)*a^3*c^4*cos(12*
f*x + 12*e) + 56*(8*A + I*B)*a^3*c^4*cos(10*f*x + 10*e) + 70*(8*A + I*B)*a^3*c^4*cos(8*f*x + 8*e) + 56*(8*A +
I*B)*a^3*c^4*cos(6*f*x + 6*e) + 28*(8*A + I*B)*a^3*c^4*cos(4*f*x + 4*e) + 8*(8*A + I*B)*a^3*c^4*cos(2*f*x + 2*
e) + (8*I*A - B)*a^3*c^4*sin(16*f*x + 16*e) + 8*(8*I*A - B)*a^3*c^4*sin(14*f*x + 14*e) + 28*(8*I*A - B)*a^3*c^
4*sin(12*f*x + 12*e) + 56*(8*I*A - B)*a^3*c^4*sin(10*f*x + 10*e) + 70*(8*I*A - B)*a^3*c^4*sin(8*f*x + 8*e) + 5
6*(8*I*A - B)*a^3*c^4*sin(6*f*x + 6*e) + 28*(8*I*A - B)*a^3*c^4*sin(4*f*x + 4*e) + 8*(8*I*A - B)*a^3*c^4*sin(2
*f*x + 2*e) + (8*A + I*B)*a^3*c^4)*arctan2(cos(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))), sin(1/2*arcta
n2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 1) + 210*((8*A + I*B)*a^3*c^4*cos(16*f*x + 16*e) + 8*(8*A + I*B)*a^3
*c^4*cos(14*f*x + 14*e) + 28*(8*A + I*B)*a^3*c^4*cos(12*f*x + 12*e) + 56*(8*A + I*B)*a^3*c^4*cos(10*f*x + 10*e
) + 70*(8*A + I*B)*a^3*c^4*cos(8*f*x + 8*e) + 56*(8*A + I*B)*a^3*c^4*cos(6*f*x + 6*e) + 28*(8*A + I*B)*a^3*c^4
*cos(4*f*x + 4*e) + 8*(8*A + I*B)*a^3*c^4*cos(2*f*x + 2*e) + (8*I*A - B)*a^3*c^4*sin(16*f*x + 16*e) + 8*(8*I*A
 - B)*a^3*c^4*sin(14*f*x + 14*e) + 28*(8*I*A - B)*a^3*c^4*sin(12*f*x + 12*e) + 56*(8*I*A - B)*a^3*c^4*sin(10*f
*x + 10*e) + 70*(8*I*A - B)*a^3*c^4*sin(8*f*x + 8*e) + 56*(8*I*A - B)*a^3*c^4*sin(6*f*x + 6*e) + 28*(8*I*A - B
)*a^3*c^4*sin(4*f*x + 4*e) + 8*(8*I*A - B)*a^3*c^4*sin(2*f*x + 2*e) + (8*A + I*B)*a^3*c^4)*arctan2(cos(1/2*arc
tan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))), -sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 1) + 105*((
8*I*A - B)*a^3*c^4*cos(16*f*x + 16*e) + 8*(8*I*A - B)*a^3*c^4*cos(14*f*x + 14*e) + 28*(8*I*A - B)*a^3*c^4*cos(
12*f*x + 12*e) + 56*(8*I*A - B)*a^3*c^4*cos(10*f*x + 10*e) + 70*(8*I*A - B)*a^3*c^4*cos(8*f*x + 8*e) + 56*(8*I
*A - B)*a^3*c^4*cos(6*f*x + 6*e) + 28*(8*I*A - B)*a^3*c^4*cos(4*f*x + 4*e) + 8*(8*I*A - B)*a^3*c^4*cos(2*f*x +
 2*e) - (8*A + I*B)*a^3*c^4*sin(16*f*x + 16*e) - 8*(8*A + I*B)*a^3*c^4*sin(14*f*x + 14*e) - 28*(8*A + I*B)*a^3
*c^4*sin(12*f*x + 12*e) - 56*(8*A + I*B)*a^3*c^4*sin(10*f*x + 10*e) - 70*(8*A + I*B)*a^3*c^4*sin(8*f*x + 8*e)
- 56*(8*A + I*B)*a^3*c^4*sin(6*f*x + 6*e) - 28*(8*A + I*B)*a^3*c^4*sin(4*f*x + 4*e) - 8*(8*A + I*B)*a^3*c^4*si
n(2*f*x + 2*e) + (8*I*A - B)*a^3*c^4)*log(cos(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^2 + sin(1/2*arc
tan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^2 + 2*sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 1) + 10
5*((-8*I*A + B)*a^3*c^4*cos(16*f*x + 16*e) + 8*(-8*I*A + B)*a^3*c^4*cos(14*f*x + 14*e) + 28*(-8*I*A + B)*a^3*c
^4*cos(12*f*x + 12*e) + 56*(-8*I*A + B)*a^3*c^4*cos(10*f*x + 10*e) + 70*(-8*I*A + B)*a^3*c^4*cos(8*f*x + 8*e)
+ 56*(-8*I*A + B)*a^3*c^4*cos(6*f*x + 6*e) + 28*(-8*I*A + B)*a^3*c^4*cos(4*f*x + 4*e) + 8*(-8*I*A + B)*a^3*c^4
*cos(2*f*x + 2*e) + (8*A + I*B)*a^3*c^4*sin(16*f*x + 16*e) + 8*(8*A + I*B)*a^3*c^4*sin(14*f*x + 14*e) + 28*(8*
A + I*B)*a^3*c^4*sin(12*f*x + 12*e) + 56*(8*A + I*B)*a^3*c^4*sin(10*f*x + 10*e) + 70*(8*A + I*B)*a^3*c^4*sin(8
*f*x + 8*e) + 56*(8*A + I*B)*a^3*c^4*sin(6*f*x + 6*e) + 28*(8*A + I*B)*a^3*c^4*sin(4*f*x + 4*e) + 8*(8*A + I*B
)*a^3*c^4*sin(2*f*x + 2*e) + (-8*I*A + B)*a^3*c^4)*log(cos(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^2
+ sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^2 - 2*sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e
))) + 1))*sqrt(a)*sqrt(c)/(f*(-462422016*I*cos(16*f*x + 16*e) - 3699376128*I*cos(14*f*x + 14*e) - 12947816448*
I*cos(12*f*x + 12*e) - 25895632896*I*cos(10*f*x + 10*e) - 32369541120*I*cos(8*f*x + 8*e) - 25895632896*I*cos(6
*f*x + 6*e) - 12947816448*I*cos(4*f*x + 4*e) - 3699376128*I*cos(2*f*x + 2*e) + 462422016*sin(16*f*x + 16*e) +
3699376128*sin(14*f*x + 14*e) + 12947816448*sin(12*f*x + 12*e) + 25895632896*sin(10*f*x + 10*e) + 32369541120*
sin(8*f*x + 8*e) + 25895632896*sin(6*f*x + 6*e) + 12947816448*sin(4*f*x + 4*e) + 3699376128*sin(2*f*x + 2*e) -
 462422016*I))

Giac [F]

\[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{9/2} \, dx=\int { {\left (B \tan \left (f x + e\right ) + A\right )} {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{\frac {7}{2}} {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{\frac {9}{2}} \,d x } \]

[In]

integrate((a+I*a*tan(f*x+e))^(7/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^(9/2),x, algorithm="giac")

[Out]

sage0*x

Mupad [F(-1)]

Timed out. \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{9/2} \, dx=\int \left (A+B\,\mathrm {tan}\left (e+f\,x\right )\right )\,{\left (a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{7/2}\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{9/2} \,d x \]

[In]

int((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i)^(7/2)*(c - c*tan(e + f*x)*1i)^(9/2),x)

[Out]

int((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i)^(7/2)*(c - c*tan(e + f*x)*1i)^(9/2), x)